Program entry point changes

Refactoring of the program's entry point and tests for users' potential
inputs.