Added some more fitting and distribution functionality