added factory and controllers and worked on routes