Changed _flat_signal
Fixed matrix dimensions/arrangements of model_params.
Edited fit and predict functions.