code cleanup. Removed unused code.