More changes to make tests faster, refactored the unit testing hook to be turned on by default in the test task.

More updates to tests to come in order to get rid of setTimeouts and such