condensed library / removed more useless code