More library work

It's definitely not done yet tho