str cleanup and fixes