fix tesla.h header, reuse rec and fix various type errors