Refactor to match activity template