Simplified parsing and fixed a bug in util.each