Refactoring and renaming resPop.js to resources.js: creating a module & adding to namespace, some syntax fixes all over the place.