Added array debug function, changed === operators to ==