Refactored simulation core