cleaned up some widowed (?) code in perceptron.py