added loc_order to location model, refactored location.js