modifying test and refactoring scanner controllers to use services instead