Refactor activity provider