Initial documentation

Very light commenting to give a general idea of most functions.