Use more convenient HSV color picker
Clean up global references
Use multiple instances of ffi instead of passing a single instance around via globals