Refactoring

Code cleanup