Changed kernel to use portable library