API : make a few functions private + tiny fix + pep8