Added autoload function and redirect on 404 page