some method renaming and added some comments for possible refactoring