Minor improvements

Comments were added. Samples were refactored.