getEntity method clean-up, self.internal variable added to Entity