Started implementing database stuff