Put all parameters into a struct

Still too cumbersome, especially in the host side.