js Object Oriented programming with closures