Add matching on arrays and add missing semicolons