updated docs, minor refactor