Minor code cleanup: Removed unused code and revised warnings.