Added the ability to get the most recent curve as a function and cleaned up the comments.