clean up the type- and length-setting logic
clean up the type- and length-setting logic

harikt/Aura.Accept,auraphp/Aura.Web,mbrzuchalski/Aura.Accept,dstockto/Aura.Web,jakejohns/Aura.Accept,auraphp/Aura.Accept