Clean up code for SubmissionAdapter.