Adding update functionality. Still need to fix error messages returns.