Reduced commandLine toLower and Trim methods call.
Simplify some if statements.