first round of fixes and enhancments