Reworks the controllers and models and adds javascript map