Cleaned up array initialization
More small changes
Almost done: *just* needs testing