Changes to Legalizer and other stuff -- Tuhin