javascript Objected Oriented Framework