fix/restructure domain controller to use resultset more consistently
use resultset for searching, sorting and pagination

- also for rowcount
- also do some cleanup/coding style