Refactoring Peceptron classes