Changed to use array literal instead of constructor
Fixed variables to stay away from reserved words
Fixed some comparisons to be better