rebarize and fix compile issues.