Added source position.

And other minor bugs and changes