Mainly fixed parts of ls.cpp and added -R