root: Refactor to caf style and tweak

Change-Id: I6b4c9edffb4ea615046f108d6dedef5362bc409a