optimizing code, replacing extend with prototypical inheritance instead

aiming to removing underscore dependencies, first attempt by removing extend