Added additional helper functions and cleaned up build graph a bit.