Start of service layer

Added in a service layer.
Concept of a repository.
Richer features.