Code Cleanup - Refactor