Changed to use just a main function and changed the while to get options by switch with cases.

Improvements in design code.