Refactored string commands to use the class.