attempt to make the (not very complicated) string parsing easier to understand
Add a rake test task