Refactors source map stringifier in OO style.