Refactoring again
Simplify a little some array queries