refactor, activities/prifles api, more tests