diff --git a/src/armax.jl b/src/armax.jl
index 01ab5b546caa513685bbb9af2c212cfce1c7c043..b3aafce6ab015298fb70bebe8448742c53beb5d4 100644
--- a/src/armax.jl
+++ b/src/armax.jl
@@ -1,6 +1,6 @@
 """`ar(y, na; λ = 0, doplot=false, bias=false)`"""
-function ar(y::Vector{Float64}, na; λ = 0, doplot=false, bias=false)
-    y_train, A = getARRegressor(y,na;bias=bias)
+function ar(y::Vector{Float64}, na; λ = 0, bias=false)
+    y_train, A = getARregressor(y,na;bias=bias)
     n_points = size(A,1)
     if λ == 0
         w = A\y_train
@@ -9,20 +9,13 @@ function ar(y::Vector{Float64}, na; λ = 0, doplot=false, bias=false)
     end
     prediction = A*w
     error = y_train - prediction
-    if doplot
-        newplot(y_train,"k")
-        plot(prediction,"b")
-        plot(error,"r"); title("Fitresult, AR, na: $na, RMSE: $(round(rms(error),4)) Fit = $(round(fit(y_train,prediction),4))")
-        # Exit ===============================================
-        println("AR done. na: $na + 1 bias, RMSE: $(round(rms(error),4))")
-    end
-    return w, error
+    return AR(w,na,bias,λ), FitResult(error,:LS)
 end
-ar(iddata::IdData, na; λ = 0, doplot=false, bias=false) = ar(iddata.y, na; λ = 0, doplot=doplot, bias=bias)
+ar(iddata::IdData, na; λ = 0, doplot=false, bias=false) = ar(iddata.y, na; λ = 0, bias=bias)
 
 """arx(y, u, na, nb; λ = 0, doplot=false, bias=false)"""
 function arx(y::Vector{Float64}, u::VecOrMat{Float64}, na, nb; λ = 0, doplot=false, bias=false)
-    y_train, A = getARXRegressor(y,u, na, nb; bias=bias)
+    y_train, A = getARXregressor(y,u, na, nb; bias=bias)
     n_points = size(A,1)
     if λ == 0
         w = A\y_train
@@ -31,17 +24,10 @@ function arx(y::Vector{Float64}, u::VecOrMat{Float64}, na, nb; λ = 0, doplot=fa
     end
     prediction = A*w
     error = y_train - prediction
-    if doplot
-        newplot(y_train,"k")
-        plot(prediction,"b")
-        plot(error,"r"); title("Fitresult, ARX, na: $na, nb: $nb, $(bias ? "+ 1 bias," : "") RMSE: $(round(rms(error),4)) Fit = $(round(fit(y_train,prediction),4))")
-        # Exit ===============================================
-        println("ARX done. na: $na, nb: $nb, $(bias ? "+ 1 bias," : "") RMSE: $(round(rms(error),4))")
-    end
-    return w, error
-end
-arx(iddata::IdData, na, nb; λ = 0, doplot=false, bias=false) = arx(iddata.y, iddata.u, na, nb; λ = 0, doplot=doplot, bias=bias)
 
+    return AR(w,na,bias,λ), FitResult(error,:LS)
+end
+arx(iddata::IdData, na, nb; λ = 0,  bias=false) = arx(iddata.y, iddata.u, na, nb; λ = 0, bias=bias)
 
 
 function getARregressor(y::Vector{Float64},na;bias=false)
@@ -54,7 +40,7 @@ function getARregressor(y::Vector{Float64},na;bias=false)
     end
     return y,A
 end
-getARregressor(iddata::IdData, na, bias=false) = getARXRegressor(iddata.y, na, bias=bias)
+getARregressor(iddata::IdData, na, bias=false) = getARXregressor(iddata.y, na, bias=bias)
 
 function getARXregressor(y::Vector{Float64},u::VecOrMat{Float64}, na, nb; bias=false)
     assert(length(nb) == size(u,2))
@@ -75,7 +61,7 @@ function getARXregressor(y::Vector{Float64},u::VecOrMat{Float64}, na, nb; bias=f
     end
     return y,A
 end
-getARXregressor(iddata::IdData, na, nb; bias=false) = getARXRegressor(iddata.y,iddata.u, na, nb, bias=bias)
+getARXregressor(iddata::IdData, na, nb; bias=false) = getARXregressor(iddata.y,iddata.u, na, nb, bias=bias)
 
 
 """Plots the RMSE and AIC for model orders up to `n`. Useful for model selection"""