moving static directory higher on middleware, getting rid of deprecated stuff