fix warnings, remove cruft