Another OOP implementation for JS