I think this is done

Some code cleanup later