1. Prevent the use of long options from throwing error messages when getting short options by swapping read order.

2. use strict, fix many minor errors.