Clean up libkernel