Move shared interface to header file rather than repeating.
Move shared interface to header file rather than repeating.