ww3 feature/clean up

This is some clean up of the ww3 code after Davide rebased some older code.