Change exceptions to specialized exception classes.
Rename $params to $filter
Start to document with php doc