Large commit which restructures the local password storage API.