some refactoring and builder for SP resources.
Doc improvements.