fixing path redirects, cleaning path logic