Merging branch made by frankgrimes97

Bringing fixed brought by frankgrimes97 and preparing the codebase for refactoring.
Unit tests are desperately needed!