Added state checking for cat-state vs database.
Fix early shutdown
Registration testing.
Added tests for cold and warm start cold-start task behaviour.
Merge pull request #708 from arjclark/expand-battery-4

Expand battery 4
Merge pull request #710 from benfitzpatrick/early-shutdown-fix

Fix early shutdown