Fix test for browser warning preprocessor
Refactor controllers to return functions.