moved search to custom repo. refactor type heirarchy and fixed generic use in repositories/service layers