Improved efficiency of take and added scalacheck tests