Closes #2. Refactoring gets from the db