refactored express js to be a bit more organized