move refactored data factory and controller in to app.js and add submit directive to form