Refactoring + save & load from xml
Adds service provider mechanism