Code refactoring / cleaning