Adds empty filter prototype
Fixes memory leaks; checks for empty storage dir