Clean up compile warnings & remove more dead code