incorporate C functions for setting up UI after dlopen
replace casts to void with GCC attribute unused.
add dlopen stuff to main