fixed a few bus and little restructuring