Added an indentation system

This replaces the existing addIndent/setIndent methods with a recursive indent method.