Fix some missing commands, cleanup header files