sidedriver: *.c/*.h split, code cleanup