Handling User Input and Structuring Responses