Integrate abc into library with some critical fixes