Added very basic version of shuffle(), few code cleanups