Removing useless arrays