some cleanup, pep8 and removed old stuff around in order to revitalize this and write some tests
added base test infrastructure