Got object oriented js somehow working