sim_cleaner function

Clean input command string