Restructure, and merging in changes to chronograph from gravityjs.