Some changes for refactoring