VID-224 Make sure we don't drop categories

Also, use the getSection and replaceSection methods of the parser.