Changed parser methods to prototype