Changed command detection to use the case statement, which broke some things but I can fix it