JS OOP problems and solutions