introduce callbacks for fini and follow child process
add various pin functions
abstract away various instrumentation functions
tidy up some repetitive code