bug fixes

Error 404 now works.
cleaning a bit