return $data, instead of receive-by-reference.
renamed filters with sensible names.
use ModelFilter for event handling for models.
fix missing $data on return; fix some unused lines.