Added the ability to smooth counts and have a prior