use modern haxe3 features, misc cleanup