implemented cmd exit
Fixed generics issues in ls implementation