setup testing conroller and cleaned up qunit code