added TODO to keep track of corner cases to fix at the end.

Also made a few small modifications fo the main file. Mostly noting that I discovered a corner case.