cleans up variable to hash conversion