Improved the function comments. Added more contracts.