fix deprecated method: stub! -> stub
remove unused variables