Refactor serving media files in development