improved console.log handling in test files
new helper function setDocumentAndSwitchLevel -> testing of it
removed debugging messages
some cleanup
added new callback test file