Made client modular, fixed js and c++ lint errors