Moved K class to a separate file. Removed "ready" since it's no longer
requried.