JS class-like inheritance