Updated TODO and added new database function