Some experiments in oop in javascript