Use type alias for keys, clean up some naming