Added relationship support to models and filter function
to controller

Models now support relationships like hasAndBelongsToMany and
the controller now has a more robust filter function
adding merge files