Optimize Middleware
Update gems
Version bump to 0.3.1
Regenerate gemspec for version 0.3.1