cleanup and fixed one warning