Made arrays local to fix build problems