Rest of ls logic. WIP.