added Action class
- changed Shape to class (and resulting refactoring)