Refactored the kwise_partition function so it doesn’t create unecessary lists.  Also fixed up a few comments/doc strings