The smallest units of living structure capable of independent existence, composed of a membrane-enclosed mass of protoplasm and containing a nucleus or nucleoid. Cells are highly variable and specialized in both structure and function, though all must at some stage replicate proteins and nucleic acids, utilize energy, and reproduce themselves.