Fix the TODO parser

The last TODO elem was almost always left out from the returned value for simple use cases.
Add the suggested example for todos
Replace tabs with spaces + add missing functions on client side