fixes #57, removed one instance of function use in favor of a similar function that is used many more places
added unittests for LogfileWriter
Moved SystemState to using the singleton class to ensure safety