Moved heartbeat and initialize out of engine.