fix unittests, and few style changes to cwc_convnet