Medium size refactor

* splits utils into more files
* makes util.Trunct take max width and max bytes arguments
* clean up some module code
* rename some util functions
* add docs to more util functions