Extract the "parsing" logic
Remove extra puts from the parser