Updated to new legalcode