fix circular require references, remove unused variables from tests