javascript prototypal inheritance, private and protected members, low memory requirement