integrating templates and refactoring js code to render a one to many type join between an organization in it's locations.