Ported more of the library forward