Simplify ls functions and add new flags 

New flags:
* -d, -directory
* -n, -numeric-uid-gid
* -r, -reverse

In addition to new flags, several functions have been rewritten/simplified.