Changed code to use ICompileScope.