server refactoring, error page routing, slight style fixes