Object-oriented Javascript framework