large rewrite of features
converting to new module format
removed some test code