Misc work on parser, made scope immutable