Moved query optimisers to separate package.