Refactored tests and added shuffle method