cleaned up the whole LoadFromArray class