Sim refactoring