Changed command string handling to scale linearly.