Fixes a bunch of warnings