A Framework for Designing Scaffolds That Improve Motivation and Cognition