adds tests for clear storage controller/ minor refactoring.
updated background sync tests
add cancel function to background sync. refs item: 745
minor refactoring
minor fixes.
adds semi colons.
Merge pull request #472 from jofomah/feature/cancel-background-sync-during-clear-storage

Feature/cancel background sync during clear storage