Re-factored, and made a very brief start on some heart-matching (since line-matching alone isn't very exciting).