Refactored some files.
More refactoring.
Added support for "composite" threshold filters (like "Used memory").