Fixed the entity chunk issues (in particular with single word queries)
Reformat and fix imports.