Parsing working + start on ls function

Accidentally committed a non working version of parsing, this is the
correct version plus a start on the ls function.