Tracked down the input problem

Fixed input, had to generalize some code, because the html varied for
different teams.