still trying to get it to compile
some more refactoring
api changes for 2.0 port
more api changes
almost compiling