404 fix, code cleanup