Syntax errors, documentation improvements, Exception base class and more

All changes should not break anything.

The smach_ros tests run fine.