Fixed statement before first while
Updated TODO