refactor evaluation of class and module bodies to use the same code