Add heartbeat API call
Import cleanup
Fix line endings