Use more object oriented way for console commands