Fix tests, updated apiary doc.