Change layout to use util.format instead of my custom version

Seems strange creating a pull request for my own code, but still. 

I've replaced the main layout function with calls to node's util.format function, since I was duplicating that code.