Reverted back to using a single array as opposed to using a 2-dimensional array for storage.