Changed db add functions to single function. Reading from db and displaying is generalized, allowing for easier changes to GUI