refactoring and basic middleware functionality
added jshint and jscs configs
v0.2.2