Pass all structs by_ref by default.
Remove unnecessary struct casting since we're using by_ref now.