Cleaned up and renamed DB wrapper.