Fix logical errors in backprop, make run without crash

Fix some indexing issues converting over from negative
indices in python impl. Add code to main so that
the testing procedure actually runs.
Add some debugging code, update make target