Huge number of fixes

A lot of fixes longly needed