broke all kinds of things

re-doing the heartbeat logic and moving things around