Further code cleanup.
Update TODO's.
Code improvements.