Speedup

code simulates a fair bit faster than before (getting complex networks with learning simulating 1s in 2s realtime)

ready to merge!