Added kwic namespace and resolved conflicts
Correctly intended code in namespaces