Refactor challenge: improve code climate score

Mainly just pulled out modules / classes / method groups into separate files. Also broke down long and complex methods into smaller methods, and converted the SQL strings in SetValidator to Arel.