Sligthly refactor codes and specs
Merge pull request #28 from dlackty/refactor

Refactor specs