Merge pull request #6 from rpwll/refactor

Some quick refactoring
Fixed cookie store error on Rails 4 RC1