made js object-oriented
oojs working