Fix pin diagram and add headertables