remove unnecessary stuff from CodeContext