Move some methods outside of the Parser class