set calculation now works for removal of set
fixed bug where adding sets was incorrect with regards to set number
moved initialization to the page where it is used