Added comments & updated documentation