 		 * @param address The address in memory.
 		 * @param value The value to write.
 		 */
-		public static function writeShort( value: int, address: int ): void
-		{
-			domainMemory.position = address;
-			domainMemory.writeShort( value );
+		public static function writeShort(value: int, address: int): void {
+			var domainMemory: ByteArray = applicationDomain.domainMemory;
+
+			domainMemory.position = address;
+			domainMemory.writeShort(value);
 		}
 		
 		/**

	 * 
	 * @author Joa Ebert
	 */
	public final class Memory 
	{
		private static var domainMemory:ByteArray=null;
		/**
		 * Selects a ByteArray object as the current memory.
		 * 
		 * @param byteArray The ByteArray object to work with.
		 */
		public static function select( byteArray: ByteArray ): void
		{
			ApplicationDomain.currentDomain.domainMemory = domainMemory = byteArray;
		}
		
		/**

		 * @param address The address in memory.
		 * @param value The value to write.
		 */
		public static function writeFloat(value: Number, address: int): void {
			var domainMemory: ByteArray = applicationDomain.domainMemory;

			domainMemory.position = address;
			domainMemory.writeFloat(value);
		}
		
		/**
