partial refactoring - services and visualization API