kiwi: Fixes after internal review

Fix C++ style check, constant references, etc.