Added middlewares support; Added lib example; beautify app.js