Test wrapper

Enclosed func calls in ifmain idiom.
Built test wrapper to strip away input/playback/callback functions to make testing easier