Working on cleaning up the overall architecture of this.