Added better error logging for Vuze and cleaned up the code a little.