separate heart.js definitions into separate file