fixing references and various corrections