Cleaned up a lot of code. Some things are still kind of messy, but it's a vast improvement over what I used to have. Data is easy to pass around the system, and the pattern info has proved invaluable for cleanly connecting prints, scans, and analysis.