Separate parsing logic