Pedantic typing cleanup