Added comments and update functionality