Refactor a controller that is all rootscope

@alex-deaconu please review