A General Context-Aware Framework for Improved Human-System Interactions