Working database stuff added.