javascript prototypical inheritance, privates, memory solution