Library rewritten from scratch.