refactor collapsable

to remove private functions from prototype chain