Add trimpb, added an alternative version of akerd that calls c code