Split library into three files