General code cleanup, where private functions have mostly been taken out of the prototype chains unless they are actually used cross-prototype, in which case they are now marked as being private with a leading underscore.