Updated library and added more tests