changed the K visitor to use KORE.

The previous visitor was too complex to translate automatically into KORE, so I manually changed it into one using directly KORE.  The new visitor can still be improved, but it did not lose anything from the previous one and it can now be easily translated/handled.