refactoring / doc / cleanup