Clean up the agreements and establishments code some.