Fix some stuff

Make send functions take references, etc