Fixed most warnings