Almost done

Pending testing