[backend] unittest for Action and minor refactoring
[backend] refactored a bit Action.py