Added chebfun context class, defined main states.

Added calcX() method.