Minor refactoring. First QUnit test case run.