Refactoring. Removed general concept of filters (mostly not used anyway).