Move render to reusable application controller function.