#5 Fix reading references

Adding/editing references still needs fixing