Additional cleanup and fixes