Move methods to Perceptron struct.