Commit

Database function fixes