Some more refactoring... started work on shuffling