Improve indent logic