Make the code more OO to make it easy to test. Some things like models/DB access need to be rearranged
First tests