I have added a huge amount of documentation and tidied up some functions that were accepting connections as arguments despite not needing them...

I have also come up with a Doxyfile that I like- I am sure it will change in the future though.