Various changes + fixes