Extracted parsing into classes