More cleanup, simplification and docs