Added some comments
Cleaned up lots of code, changed toggles to server calls