Javascript Object Oriented framework