separated service actions from routes into lib/actions.js
a bit more code reduction
removed unused code