More cleaned code; also was added the 404 warning error