Error functions, proper backpropagation iterations implemented