Move helper parsing function to the top, preventing source to be modified previously