Fix some warnings and other things