Allow more than one js to be loaded for a view in loader.js
Refactored patient.js and some small js fixes