Added comments and documentations.