Added a new way of calculating the likelihood gradient. The code is still a draft, but looks promising.