Added comments and adjusted doc type