Cleaned up the code in static_pages_controller