Broke up graph into templates to support custom layouts