IDE recommended changes (remove unused vars and some explicit declaration)