cleaning up app.js, fixed dev cluster check