Removed a resource leak in the WorkloadManager. Also the SanityClient has been enhanced with new tests significantly.