Moved flow parser to separate file