Implemented a function to handle and validate user input in the main application module. This improves input reliability and prepares the codebase for future enhancements.