Some small bugs, and updated TODO.txt