(Finally) brought order to chaos. Fixed CORS and navigation issues with trip_select.
Moved some code from utils.js to offlinemaps.js, i think it's easier to read now.
Started working on showing routes on map.