Simple classes in javascript