Bind functions to structs