Added comments and TODO defenitions

TODO consists of adding logic to shutdown threads the right way instead of just closing them which produces exceptions.

Some minor code clean up is also left todo but nothing major