refactored static file handlers