Simplify parse functions

- makes `parse_*` functions receive only two arguments: ts and elements
- `parse_args` becomes simpler