- moved actions into respective unit structures
- added some utility functions