[FOLD] beast: move parser to its own class and file