Add tests and some array support