server config migration to 4.0

Removed unused middleware
Support no files present

When no wallpapers/files were present app would throw error. Fixing for
now but 'files' will be removed. For that look into the 'refactor'
branch