add comments for some files & some refactoring