Changes 'if' statement to a 'switch' statement.
Merge pull request #2 from curriedav/master

Changes 'if' statement to a 'switch' statement.