Massive update: created the client_api.jsp page which is a REST API for mobile clients; arranged all JavaScript functions from all pages into a single file (js/functions.js); created a single database connector, defined in setup/sun-resources.xml with a reference for all DB actions to use in all the pages.