Refactor model and add filter & search helper