Added major changes to database and improved functionality