Add new activity.
Some refactoring.