Added comments so that hopefully I can remember what I did just now.