Completely rewrote how library was built.