Added hearbeat handler, repository and controller