Added global smart space + improved background handling, SDK state saving

Signed-off-by: Conrad Bartels Daal <conrad@proxible.com>