initial implementation of AbstractCompiler::compileSelect(), other minor fixes