lots of cleanup, refactoring