Create OOP javascript