removed jsdoc config and put into package.json scripts
split up reusable functions and middleware into smaller modules