Renamed and arranged so I can import it and use as a module.
Fixed the list index task.
Added HTML generation back.
Wrong variable names.