Changed some parsing code