Added JavaScript logic to generate a 2x2 cube. Almost works with a 3x3, but still needs work.