DRY up submissions.rb a bit.