Changed example to use energy functions from the CRF class