better comments, added tests, and Function#bind removed as dependency