added tests, refactored some names, removed some unused files