Minimal refactoring, perceptron's layers access methods and calculation.