Add better filters to ls

ls can now be used to filter the local view, and has the ability to
limit the number of output lines
Update ls flags for conistency

The MAX variable is now the first argument, making it consistent with
other flat view commands