refs #1: Query optimizations.
refs #1: Don't need the migration
refs #1: Code cleanup
Merge pull request #1 from PolicyStat/issue_1

copy_attachments does some pretty terrible things