Refactoring: get rid of string representation. Tests passed!