Expanded Unit Tests, bug fixes

Added unit tests for Engine and all built-in handlers.  Fixed bug in
Engine.