ls.cpp finished, tested with valgrind and cppcheck - no leaks were found