Much better way of storing refs.