Simple class builder for javascript