AS2 and JS now works properly on haxe + small fixes