Updated some of the code.