Several path-related changes + fixes for HTML