renaming and moving variables to stats from entity.
clarify some comments