Added Heartbeat and TestView and refactored.