Refactored out string-to-integer comparisons.

Did some cosmetic changes to the tests as well. All of them currently
pass.
Added tests for how icon configurations are parsed.

These tests currently passes.