Transported the parsing code to a parsing script.