Cleaned up simulation code