Commented a lot of the code