Minor code cleanup and added capacity to the handle descriptor because it is needed on some platforms.