Added filename suffix constraints for static files and refactored handlers