Understanding Gibbs free energy
Yes your logic is basically correct. 

Gibbs free energy is really derived is from the Clausius in equality which is: $$dS\geq \frac{dq}{T}$$ Basically is states that in a reaction, the change in entropy must always be equal (in the case of an ideal gas) or greater than the transfer of heat energy divided by temperature. Therefore, for a reaction to be spontaneous, the following relation must be satisfied: $$dS-\frac{dq}{T}\geq0$$ Now, lets consider two cases so we can simplify this relation. 

Constant Pressure

Enthalpy is given by: $$\Delta H_p = \Delta U + p\Delta V$$
and internal energy by: $$\Delta U = q + w$$
Now by substituting $\Delta U$ in the expression for enthalpy we get: $$\Delta H _p= q + w + p\Delta V$$ Now, since w = $-p\Delta V$, the above equation simplified so that: $$\Delta H_p = q$$ So, now in the Clausius inequality, we can substitute dq with dH and multiply by $T$ to get: $$TdS \geq dH$$ Now by integrating both sides and putting all the variables on one side, we get the question for gibbs free energy: $$\Delta G = \Delta H - T\Delta S$$ and hence this is why $\Delta G$ has to be negative for a reaction to be spontaneous

Constant Volume

At a constant volume, there is no expansion work done, therefore $dU = dq$
Therefore by using the same processes as before, we are able to get the expression for Helmholtz energy, A, which is defined as: $$\Delta A = \Delta U - T\Delta S$$ Here, for a reaction to be spontaneous, $\Delta A$ must be less than 0