 package Modules {
 	import Displays.DModule;
 	import flash.geom.Point;
+	import flash.utils.ByteArray;
 	import flash.utils.Dictionary;
 	import Layouts.*;
 	import Components.Port;

				return new type(x, y, C.safeInt(args[3]))
			return new type(x, y);
		}
		
		public static function init():void {
			ModuleCategory.init();

		}
		
		
		
		public function saveString():String {
			return getSaveValues().join(U.ARG_DELIM);
		}
		
		public function getSaveValues():Array {
			return [ALL_MODULES.indexOf(Object(this).constructor), x, y];
		}
		
		public function getBytes():ByteArray {
			var bytes:ByteArray = getSaveBytes();
			bytes.position = 0;
			bytes.writeInt(bytes.length + 4);
			return bytes;
		}
		
		protected function getSaveBytes():ByteArray {
			var bytes:ByteArray = new ByteArray();
			bytes.writeByte(ALL_MODULES.indexOf(Object(this).constructor));
			bytes.writeByte(x);
			bytes.writeByte(x >> 8);
			bytes.writeByte(y);
			bytes.writeByte(y >> 8);
			return bytes;
		}
		
		
		
		public static function fromString(str:String, allowableTypes:Vector.<Class> = null):Module {
			if (!str.length) return null;
			
