compile to ybc only modules and refactor such part slightly