cosmetics: remove unused code, small formatting tweaks