Fixed issues on callback scope

This will reduce the needed code to connect two datapoints
Implemented heartbeat