MAINT: remove unused variables and functions