Added fixes for all errors
Diffs only need trimming during unit testing