expanded some docs, added write out functionality
removed a bunch of debug info