Did some code refactoring
Did some code refactoring