Add getCommand function and remove getTask function for parser