Updated views to save data to database