totient function fixed, core library updated, TODOs modified