Fixed many compiler warning issues