docs: function(identifier, typemap, args, error) {
  		var bufArray = [ new Buffer([ module.exports.EnumExecutionCode.ExecFunction ]) ];
  		bufArray.push(new Buffer(4)); // [1] = reserverd for total payload size, minus the execution code
  		
  		var buf = new Buffer(4);
  		buf.writeUInt32LE(identifier.length);
  		bufArray.push(buf);
  		
  		var tempBuf = new Buffer(identifier);
  		bufArray.push(tempBuf);
  		
  		var payloadLength = 4 + identifier.length;
  		for(var i = 0; i < args.length; i++) {
  			var iStr = i.toString();
  			var argtype = typemap[iStr];
  			
  			if(!argtype) {
  				if(args[i] === null) {
  					argtype = 'null';
  				}
  				else {
  					switch(typeof args[i]) {
  						case 'number':
  							if(args[i] === (args[i]|0)) {
  								argtype = 'int'; // Default to int for normal numbers
  							}
  							else {
  								argtype = 'float'; // float for anything else
  							}
  							break;
  						case 'string':
  							argtype = 'string';
  							break;
  						case 'boolean':
  							argtype = 'boolean';
  							break;
  						case 'undefined':
  							argtype = 'undefined';
  							break;
  					}
  				}
  				typemap[iStr] = argtype;
  			}
  			
  			var dataType = module.exports.EnumDataType[argtype];
  			if(dataType !== undefined) {
  				switch(dataType) {
  					case module.exports.EnumDataType.byte:
  						tempBuf = new Buffer(1);
  						tempBuf.writeInt8(args[i], 0);
  						break;
  					case module.exports.EnumDataType.ubyte:
  						tempBuf = new Buffer(1);
  						tempBuf.writeUInt8(args[i], 0);
  						break;
  					case module.exports.EnumDataType.short:
  						tempBuf = new Buffer(2);
  						tempBuf.writeInt16LE(args[i], 0);
  						break;
  					case module.exports.EnumDataType.ushort:
  						tempBuf = new Buffer(2);
  						tempBuf.writeUInt16LE(args[i], 0);
  						break;
  					case module.exports.EnumDataType.int:
  						tempBuf = new Buffer(4);
  						tempBuf.writeInt32LE(args[i], 0);
  						break;
  					case module.exports.EnumDataType.uint:
  						tempBuf = new Buffer(4);
  						tempBuf.writeUInt32LE(args[i], 0);
  						break;
  					case module.exports.EnumDataType.float:
  						tempBuf = new Buffer(4);
  						tempBuf.writeFloatLE(args[i], 0);
  						break;
  					case module.exports.EnumDataType.double:
  						tempBuf = new Buffer(8);
  						tempBuf.writeDoubleLE(args[i], 0);
  						break;
  					case module.exports.EnumDataType.string:
  						tempBuf = new Buffer(args[i]);
  						break;
  					case module.exports.EnumDataType.boolean:
  						tempBuf = new Buffer(1);
  						tempBuf.writeUInt8(args[i] ? 0x1 : 0x0, 0);
  						break;
  					case module.exports.EnumDataType.undefined:
  					case module.exports.EnumDataType.null:
  						tempBuf = new Buffer(0);
  						break;
  					default:
  						error(new Error('Data type ' + dataType + ' has gone unhandled by client'));
  						return;
  				}
  				var argHeader = new Buffer(5);
  				argHeader.writeUInt8(dataType, 0);
  				argHeader.writeUInt32LE(tempBuf.length, 1);
  				bufArray.push(argHeader);
  				bufArray.push(tempBuf);
  				
  				payloadLength += argHeader.length + tempBuf.length;
  			}
  			else {
  				error(new Error('Unsupported data type argument passed to remote function'));
  				return;
  			}
  		}
  		
  		bufArray[1].writeUInt32LE(payloadLength);
  		
  		return Buffer.concat(bufArray);
  	}