Moved LineChart to services, cleaned up remaining functions in controller, cleanup.