Perform refactoring a bit