Consolidated 2 if statements into 1.
Added option 'Text alignment'.