Try to use by_ref everywhere