This should be probably be split out better.