added tests, changed file structure and simplified some models, added a session handler

mostly change in file structure, no big deal
also added basic tests