Updated the architecture a bit