Added a setProfiler method to the Parser instead of using constructor.