Many major/minor fixes