(ONGOING) Code refactoring