Many changes/fixes