Changed from prototype methods, to closures since closures make more since.