Refactored get method and moved cache/config dependiencies into seperate methods.