Smal refactoring