All tests are passing but there is not very good coverage, probably needs to be fixed before serious refactoring