Added loading/saving of weights.