Refactored language element code (in preparation to allow inheritance for methods).