Bug fixes for performRoles
Memory fixes
Miner and courier work