Refactored duplicated code
Merge branch 'master' of github.com:atlasapi/atlas-deer