static file paths, try/except block, javascript cleaned up