Switching to a repository pattern for a little easier testing and cleaner operation