Added lots of code documentation and improved README