Cleaned up testextractor
Sped up unit tests
Wrote unit tests for the logger, fixed up some mistakes in logger and database