CONN-1161 & CONN-729

Resolved more issues found during QA of CONN-1161 and CONN-729, and a bit more code cleanup.
I added a comment to clarify why this has been left in (and also added back in the import, which had been auto-deleted on save).  Created CONN-1188 to track this issue.