some cleanup
fix output layer weight adjustment