Stopped crash when terms have semantic type Action, but don't have primactions.
Fixed bugs and added example code for each one.