optimize object.prototype for public and private methods