remove unused variable and assignment

remove unused variable and assignment in AP