Subfolder support

hardcoded URLs removed and config value used throughout site.  This allows code to run within subfolder from main domain