Plurk: refactor for c++ and coding style