fix warnings, cleanup