Returning functions instead of using bind
Updated tests