fix errors and warnings; few renamings