Service app bugfix + refactoring