General code cleanup (whitespace, unused variables/imports)