only displays directories in results
slightly improved ui
handle EOF
fixed minor bug