haxe3 updates. still requires -D no-pattern-matching in order to build and function as-is due to switch and pattern match changes.