Updated Profile class to add functions for storage to database.