Fixed minor bugs and implemented MCMC sampling through emcee package