add a little documentation and separate the utilities a bit