Implemented some activity logics.