Infer type from location
Clean up app controller
Refactor tracks controller