KEK generation, UI's and bug fixes in input stream