Add tests
Reorganize actions