Simplified the main interaction loop