[Parser] Moved stuff to a class