Removed unused code. Added negative tests.
Merge remote-tracking branch 'ben/activity-unit-tests' into activity-unity-tests