Updated for Haxe 3