added a bit more tests
refactored files