refactor heartbeat module
Merge pull request #550 from leonindy/master

refactor heartbeat module