Added line and column tracking to parsing

Also fixed a multitude of bugs.