Fix for kat.ph - updated some of the parsing code