fix indentation and add 'hide-empty' option