Added code coverage to unit tests.
Filled in missing unit tests.
Fixed minor bugs exposed by missing tests.
Added event to entity.addChild/removeChild