Updated quantity functionality.