Reimplemented the basic structure again.