remove unused variables, type fixes

Signed-off-by: Steve Markgraf <steve@steve-m.de>