Added sorting to ruby. Fixed setup script