Added new input functions with exception handling in a new package.
Added the use of the package in the main function.