Some minor changes to domain and repository objects and SecurityManager implementation.