Add system hooks and tests for them