pneumatics latest code

Heavily refactored, added aunit tests.