Moved UIContextImpl specific methods to UIContextImpl
Fixed compilation errors
make each controlsequence responsible for handling the document changes through document proxy