Cleaned up some maths for readability and correctness

While the transfer function was purported to be modular, in fact it
was not.  The function itself was modular, however its derivative was
assumed and hard-coded.  This has now been fixed.

The back-propagation code still needs to be better documented.

Finally, the transfer function no longer needs to be submitted as a
function pointer, but instead as a string.  If the string is not
recognized as a valid transfer function, an exception will be raised.