Fix warnings, cleanup