touched up error handling (probabilistic ftw) and fixed other minor issues