Added comments for the implementation.