Setup refactoring