code cleanup for unused variables and imports