Refactor. Less global functions. More namespaces.

Move 'contains' and 'isInt' helpers to 'Helper' namespace.
Move department rules to 'Rules' namespace.
Move elective-match logic to 'Course'.