refactor, clean up bunch of new stuff