Added lots of documentation