Added constuctor which sets device type