Update code for new haxe and hxcpp conventions