DRY up submissions.rb a bit.
Merge pull request #1523 from Gaelan/patch-2

DRY up submissions.rb a bit.