Rewrote library from scratch.