Cost and Transfer functions

First set of cost of transfer functions.

It is now possible to build a network of sublayers!