Centralized the user input reading in one method.
Added a verification for the category input.