More resiliant to arbitrary spaces elsewhere in the line.
Merge pull request #1754 from rmillner/better_key_parsing

More resiliant to arbitrary spaces elsewhere in the line.