Change `#unformat_string` to class method

Allows for more easily calling it from other class methods.