Added init functions to classes.