Fix more key errors

Also some cleanup