Cleaned up some docs and code