Implemented Quantity and added tests