Added trustee generation and some other fixes