Code Cleanup / Refactoring