Extract IndentCalculator.

Avoid duplicate code.