More polishing of code; removed compilier warnings.