Implemented more of the basic code.