Ownership of matrimonial property vests in the spouses according to the contribution of either spouse towards the acquisition and shall be divided between the spouses if they divorce or their marriage is otherwise dissolved.