Wrote beginning of life-checking functions and modified some existing functions