Fix some warnings and style