tjws - cleanup and fix warnings