Small refactoring plus code commenting is done!