Extract axls generartor from controller to lib