Removed dead code.
Added arguments for global functions.
Removed dead code and related docs.
Added documentation for robot context.
Fixed error reporting.