Updatest to the data structure in database. Also outputting the data correctly now