Revert "Fix build and fix warnings