Use the 'twinfield_bootstrap' action to make sure that the Twinfield plugin is loaded.
Removed unused functions.