some changes, clean up, documentation started