On page 33 of Vakil's book on Algebraic Geometry, he shows how one can define the localization of modules purely in terms of universal property and later shows that a specific definition satisfies the property. Basically he says that if $M$ is an $A$-module and $S$ a multiplicative subset of $A$, define a map $\phi:M\rightarrow S^{-1}M$ as being initial among $A$-module maps $M\rightarrow N$ such that all elements of $S$ are invertible in $N$ i.e. $s\times\cdot: N\rightarrow N$ is an isomorphism for all $s$.
So far, so good. However, he then proceeds to make two assertions which confuse me:
(i) The definition determines $\phi:M\rightarrow S^{-1}M$ up to unique isomorphism.
(ii) By definition, $S^{-1}M$ can be extended to a $S^{-1}A$-module.
I tried to prove the first one by first assuming that there's another map $\psi:M\rightarrow B$ that also satisfies the universal property. I was tempted to then say, by the universal property defined, that there is a unique map from $f:B\rightarrow S^{-1}M$ such that $\phi = f\circ \psi$. However, I have no way of knowing that elements of S are invertible in $S^{-1}M$. Do note that we haven't explicitly defined $S^{-1}M$ yet and so we can't conclude that elements in $S$ are invertible in $S^{-1}M$
The second assertion is related to the first one. How does one conclude from the definition that $S^{-1}M$ can be extended to form a $S^{-1}A$-module? I tried using the invertibility of $S$ in $N$ or choosing a specific $N$ but invertibility in $N$ says nothing about invertibility in $S^{-1}M$ and choosing a specific $N$ (localized module $M$ according to the actual definition for instance) seems like cheating since we're supposed to get the assertion purely via universal property.
EDIT: So it seems like I didn't fully understand what "initial" meant. I didn't count $\phi:M\rightarrow S^{-1}M$ to be in the class of maps that have elements of $S$ to be invertible in the range. The problem is pretty straightforward after realizing that.