template and produce_locals properties may be callable functions
put some utility methods into util.js
list_tables() replaced start()
move showPage and showError functions to the top
list_tables() wrapped in cache_wrapper()