Replaced old parser with new one. This code has not been tested! Use at your own risk.