Investigations Into The Simulation And Training Of Spiking Neural Networks