refactoring synapses and net init