Move away from references

Using references seems to cause some trouble with propagating flashes from request to request. This removes the references and compresses the flash storage to a single level of depth.