add jhint, fix client leaks