Move things around and start adding necessary util functions