Code cleanup. Added TODO comments