Refactoring actions halfway done.