Added scopes & contexts for better serialization