Added initialization functionality to the Parser constructor