Refactored indent extraction