Pull out some logic from get method
Merge pull request #1 from lloydmeta/refactor/lower_method_complexithy

Pull out some logic from get method