changes declarations etc to meet -ansi -pedantic