Fix variable encapsulation so lint checks pass