Database functionality added.