Several improvements and refactoring including moving scalar product calculation to a separate service.