Refactoring - get rid of unnecessary string allocations.