Cleanup of kernel.swift