Fix code and tests, alter proposal per email