Extracting parsing methods to a new module and adding some tests.