Added QuickCheck tests