Converted command classes to functions