Fixing up the TAs horrible code.