Fixed return type error checking.
Update TODO.md
Added counted loops