Clean up and use context better.