Reimplemented completely with a new architecture.