cleanup in controller.java