Django tests and small take or leave tweeks

Hi Will.

Looking at starting to add some tests and help maybe make the application a little more maintainable.

Talk more in the office today :)