Fixed test mode for OSX.
Method clean up.
Merge pull request #11 from snadorp/master

Test-mode working on OSX again