Use an array for references

- Use an array for references
- Split out references for test