Added parameters to enable weight adjustments and spike threshold