Reformulation of elasticity theory for liquid crystals and lipid membranes