Fixed Array problem and added more tests