Fix some warnings and other minor details