Refactor for rails independent usage. Resolves #1.
Merge pull request #2 from vladson/rails_independent

Refactor for rails independent usage. Resolves #1.