Finished implementing the initial version.