Refactored database colleciton structure.