Added factory to return json to controllers

Working on organizing the .js structure