refactor static_controller to move functionality to models