Parsing logic moved into separate module