BZ-989519 first all internal dependencies then all external dependencies + code style (2 space idents)
(cherry picked from commit b9bb3232dbd850fe78f35392585895b657034a42)