Porting to Haxe 3