This looks a little weird in terms of layering, maybe this should be in a different class.