add local version of scripts and css.
various updates to the templates and api