Fixed some compile- errors and warnings.