Code cleanup.
Query will be splitted before apply.