File filter and directory filter fully implemented and some cleanup
done.