Playing with Javascript sub-classing and data hiding