Continued work on the kraken implementation (not tested yet and not complete).