Move the parsing logic to a separate file.