One general comment: we frequently use account.to_bytes() to convert account ID to a vector of bytes. This results in allocations and I wonder if it would be better to use something like u128 or [u8; 15] as a "native" type for account ID.
Originally posted by @bobbinth in #591 (comment)