Added getType and setType functions.