Improved tests and array conversion