Fixes for the database class and improvements on adding a list