Added type property to motors and fixed regular expression