restructuring for express web app