Added tests for settning keys. Implemented scopes as lists.