Code cleanup & refactoring
Code cleanup & refactoring