added better source-mapping generation. Fixed .begins and .ends overwriting during AST construction