Debugged a few spots
Added a bunch of print debugs
Added norm for residual
Cleaned up code ready for parallel