Refactor some code dublication
Version bump to 0.8.0
Regenerate gemspec for version 0.8.0