Made the entity class less public.

Added comments to all functions in the entity class.