CFY-1308 bugs fixed, code normalization