Made several more changes per JonT's code review. Re-submitting.