massive restructure
basic tests, add more soon
more tests
debug