Increased test coverage
Removed dead check in delegation.py
Fixed small bugs identified by new tests