Updated the loop invariant and more comments. Just need to do up a README now