Extracted code from K2 into komponent.