git rid of an unnecessary rootscope injection, changed some indentation, moved around some code