Updated implementations with better javadoc commentating.