move some crossbar stuff to crossbar.cpp file