Changed kernel class to allow tmp env switch