Improved option order.
Did some code cleanup.