Network now has memory (N pairs of inputs and outputs in recurrent layer). Also fixed some errors in network methods.