Refactor and cleanup kitinSearchEntity