Cleaned up the code a bit. Removed shuffle logic for now.