Removed FlatArray class and replace usage with normal arrays for performance reasons