ServiceApplication: Refactored position calculations.