Add Model factory to move AJAX out of controllers

Simply customer controller using the factory