Name and modularize server; add middleware