This is probably a method we should refactor into smaller pieces, or it's own object.