Improved options hiding.

Propperly remove empty lines when options are hidden.