General Cleanup
 - Rename P_RESULT_OK and P_RESULT_FAILED
   to J_RESULT_OK and J_RESULT_FAILED
 - Close include_dir properly
 - Search PLUGIN_DIR for plugins