some refactoring, fixed create type bugs
make haxelib related stuff working again (no globals anymore)