Using OOP in my JS code.