Understanding control of lithium morphology in lithium metal batteries