Fixed edge-case bug for feb 2015. Cleaned up some bugs for Gaussian algorithm.