Adds the rest of the functionality to the code.