remove two obsolete helper functions
refactoring; slightly speed up elementary functions for small input