Fixed custom manager; added some tests