Tons of error checking, merged 404 templates into just one teplate.