Moved UIContextImpl specific methods to UIContextImpl
Fixed compilation errors